package com.itheima.tlais_web_management.mapper;

import com.itheima.tlais_web_management.pojo.Book;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BookMapper {

    @Select("select * from tlias.books")
    List<Book> list();

    @Delete("delete from tlias.books where id = #{id}")
    void delete(@Param("id") Integer id);

    @Insert("insert into tlias.books(name, author, publisher, price) VALUES (#{name},#{author},#{publisher},#{price})")
    void insert(Book book);
}
